<?php
$userId = strtolower($email);
$currentUser = BUser::find(array('userId' => $userId));

if($currentUser != NULL) {
    $sentMailMsg = "您的帐号 ".$email.
            " 尚未激活。请检查我们发送给您的邮件，点击相关的链接来完成激活."."</a><br /><br />谢谢.</body></html>";
    echo $sentMailMsg;

    //keep following code for debug
    $activationKey = $currentUser->myid;
    $regUrl = Yii::app()->createAbsoluteUrl('site/activate', array('activationKey' => $activationKey, 'email' => $email));
    $message = "<br /><br />Following link just for debug, MUST REMOVE in registerNotice.php !<br /><br />Please click below link to activate your account.<br />".
                "<a href=".$regUrl."/>"."Activate account: ".$email." now!"."</a><br /><br />Thank you.";
    echo $message;
}
else
    echo "<html><body>Account ".$email." not existed!</body></html>";
?>